home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
726-750
/
744
/
nfd
/
nfd.readme
< prev
next >
Wrap
Text File
|
1995-03-18
|
5KB
|
120 lines
+------------------------------------------------------+
|NFD (Newest File Data) © (copyright) 1991 Jon Maxwell |
+------------------------------------------------------+
|This program may be freely distributed, but I reserve |
|all rights to it and to the source code. |
+------------------------------------------------------+
|USAGE: NFD [±Pattern] [Directory] [Command] |
| [Command] is the line to be run with the newest file|
|name, in this form: (Text)¿(Text) where (Text) is part|
|of the command and ¿ (shift-alt-M) determines where |
|the file name will be inserted. |
| a + pattern means that it must match that pattern, a|
|- means that it must not match. Do not use any pattern|
|symbols (*,#?,?,etc) |
+------------------------------------------------------+
| If there is no [Command] parameter, NFD will assume |
|that you have ARP and will set an ARP global variable |
|under the name of $FileName. |
+------------------------------------------------------+
|Source compiled with Patrick Quaid's PCQ |
+------------------------------------------------------+
AUTHOR
------
This program, NFD, is a work of Jon Maxwell. I grant you the right to
copy it and to use it as you see fit. The only restriction to distribution
is that all files in the original archive must be intact and unchanged.
The source code, in Pascal, is just for you to look at. You can of course
recompile it, but any recompiled code and/or modified code cannot be
distributed without my written permission.
GUARANTEE
---------
This program, NFD, is not guaranteed in any way. Should any problem
develope, I will not be responsible. Use at your own risk. I have found
no problems in it, and it _should_ work with any system configuration,
but I have not had any chance to test this. It also _should_ not do
anything it wasn't intended to do, but I make no promises.
WHAT IT DOES
------------
This program, NFD, will search through a directory specified in the
parameters (no parameters will mean the current directory) for the
newest file. Subdirectories are not considered for the newest file, thus
ensuring that it will be a file. When it is done searching the directory,
it returns the newest file's name in a global variable called "FileName".
If there happens to be no file in a directory then it returns the global
variable as a "!" (don't ask why!).
Unfortunately, the global variables only work under ARP. This would make
this program do nothing useful without ARP (it would search a dir, but
when it returned information it will make an error). To get around this
problem, I added a second CLI parameter. When this parameter is present,
NFD assumes that you do Not Have ARP. The second parameter is a CLI line
that will be executed by NFD. If it contains spaces, put quotation marks
(") around the line. Where you want the newest file name to be inserted,
simply put a ¿ (shift+alt+M). You may only put one insertion of the newest
file name into the line. Speaking of quotation marks, NFD will automatically
put them around the inserted file name, IF the file name has spaces in it.
USING PATTERNS
--------------
Pattern matching is one addition I have made since earlier versions. I
hate it when you can only specify a PRO pattern; that is, a pattern
for the files you want to include instead of exclude. This program will
let you do both include and exclude type pattern matching. The actual
matching is somewhat crude -- you can only set one item to look for.
I don't really know how to say it, but maybe an example will do it for
me. Okay, you can look for any file that contains a ".info" or some other
whole group of characters. You can't look for something that has a
search pattern of, say, "Am#?.info." The format is very simple: Between
the first parameter and the program name, insert a + or - followed by
the pattern. If the pattern contains spaces, put quotes around the
whole thing (+ and - included). Be sure not to put any pattern symbols
in it (*, #?, ?, etc.). A + pattern means everything must match the
pattern, and a - means that everything must NOT match the pattern.
POSSIBLE USES
-------------
The possible uses for this program are many, mostly related to making
assorted things automatic. For instance, you could make a script that
would run your favorite text editor or word processor with the last
text that you were working on as a parameter for it (thus letting you
easily resume where you left off).
KNOWN BUGS
----------
There is one known bug as of this time. For some strange reason, NFD
defaults to ARP mode if the second parameter is a one character one. A
way to get around this is to always put the second parameter enclosed
in quotation marks (").
THE FUTURE
----------
There are plans for future enhancement if enough people take interest
in this program. The only thing I could add to it, that I can think of
now, is a subdirectory search. As it is now, it will ONLY search in the
directory specified.
=========
READ THIS
=========
I hope you enjoy this program, and it is useful. If you _want_ to send
me money, or you have suggestions, send it to this address:
Jon Maxwell
7706 Hillview Avenue
Richmond, Virginia 23229
Or, send E-Mail to Scruffy at any local Richmond, VA, area Amiga BBS (such
as Late Night Amiga: 804-262-9944).